package com.ptswitch.material.dao.hibernate;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.hxzon.project.EHibernateDaoSupport;
import com.hxzon.util.StringUtil;
import com.ptswitch.material.dao.BomMaterialDao;
import com.ptswitch.material.model.BomMaterial;

@Repository("bomMaterialDao")
public class BomMaterialHibernate extends EHibernateDaoSupport<BomMaterial> implements BomMaterialDao {

	public List<BomMaterial> getByCode(String code) {
		code = StringUtil.escapeSql(code);
		return getList(" where p.code='" + code + "'", -1, -1);
	}

}
